## ******************************************************************
## ** 生成sqoop导入命令
## ******************************************************************
dt=$1

sqoop import \
 --connect "jdbc:mysql://10.50.20.44:3306/duoec_owner?zeroDateTimeBehavior=round&tinyInt1isBit=false" \
 --driver com.mysql.jdbc.Driver \
 --username esf_bigdata \
 --password-file /user/oozie/share/lib/lib_20151229093730/password_mysql_pro.file \
 --table t_owner_fast_sell \
 --columns "id,owner_id,clue_id,estate_id,create_time,update_time" \
 --where "DATE_FORMAT(create_time,'%Y%m%d')=${dt} or DATE_FORMAT(update_time,'%Y%m%d')=${dt}" \
 --target-dir /user/hive/warehouse/duoec_owner_edw_source.db/s_du_t_owner_fast_sell_delta/dt=${dt} \
 --delete-target-dir \
 --input-fields-terminated-by "\001" \
 --fields-terminated-by "\001" \
 --hive-drop-import-delims
